import Vue from 'vue'
import App from './App'
import store from './store'
import MinCache from'./common/util/MinCache.js'
import tip from'./common/util/tip.js'
import configService from'./common/service/config.service.js'
import '@/common/util/dateFormat.js'
import router from './common/router'
import {RouterMount} from './plugin/uni-simple-router/index.js'

//引入mescroll插件
// import MescrollBody from "@/components/mescroll-uni/mescroll-body.vue"
// import MescrollUni from "@/components/mescroll-uni/mescroll-uni.vue"
// Vue.component('mescroll-body', MescrollBody);
// Vue.component('mescroll-uni', MescrollUni);

// 引入全局TuniaoUI
import TuniaoUI from 'tuniao-ui'
Vue.use(TuniaoUI)
// 引入TuniaoUI提供的vuex简写方法
let vuexStore = require('@/store/$tn.mixin.js')
Vue.mixin(vuexStore)
// 引入TuniaoUI对小程序分享的mixin封装
let mpShare = require('tuniao-ui/libs/mixin/mpShare.js')
Vue.mixin(mpShare)
import shareMixin from '@/common/mixin/shareAuthMixin.js'
Vue.mixin(shareMixin)
// 注册缓存器
Vue.use(MinCache,{timeout: 6})

// store
Vue.prototype.$store=store;
// tip
Vue.prototype.$tip=tip;
// config
Vue.prototype.$config=configService;

// request请求
import { http } from '@/common/service/service.js' 
Vue.prototype.$http = http

import apiService from "@/api/api.js"
Vue.prototype.$api = apiService



// 自定义组件
// import mySelect from './components/my-componets/my-select.vue'
// Vue.component('mySelect',mySelect)

// import myImageUpload from './components/my-componets/my-image-upload.vue'
// Vue.component('myImageUpload',myImageUpload)

import navSearchBar from './components/my-componets/my-nav-search.vue'
Vue.component('navSearchBar',navSearchBar)

import myRichText from "@/components/my-componets/my-rich-text"
Vue.component('myRichText',myRichText)
import wxShare from "@/components/my-componets/my-share"
Vue.component('wxShare',wxShare)
import myGuideNav from "@/components/my-componets/my-guide-nav"
Vue.component('myGuideNav',myGuideNav)


// import VConsole from './js_sdk/vconsole.min'

//   var vConsole = new VConsole();

Vue.config.productionTip = false

App.mpType = 'app'

const app = new Vue({
	// mixins:[shareMixin],
	store,
	MinCache,
    ...App
})
//v1.3.5起 H5端 你应该去除原有的app.$mount();使用路由自带的渲染方式
// #ifdef H5
	RouterMount(app,'#app');
// #endif

// #ifndef H5
	app.$mount(); //为了兼容小程序及app端必须这样写才有效果
// #endif



 



